package com.fast.controller.system;

import com.fast.controller.BaseController;
import com.fast.entity.SysMenu;
import com.fast.services.SysMenuService;
import com.fast.utils.bean.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by xiehaitao on 2017/9/16.
 */
@RestController
@AllArgsConstructor
public class MenuController extends BaseController{


    SysMenuService sysMenuService;



    /**
     * 导航菜单
     */
    @RequestMapping("/nav")
    public R nav(){
        List<SysMenu> menuList = sysMenuService.getUserMenuList(getUserId());
        return R.ok().put("menuList", menuList);
    }


}
